@/*
    SwitchBox标签中各个参数的说明:
    name : 名称
    id : id
    value:1 | 0
    onText:是
    offText:否
    size: 'mini' ｜ 'small' | 'large'
    onSwitchChange:function
@*/
@if(isEmpty(value)){
@   value=1;
@}
@if(isEmpty(onText)){
@   onText="是";
@}
@if(isEmpty(offText)){
@   offText="否";
@}
@if(isEmpty(size)){
@   size="small";
@}
@var SwitchHandler="+function(){}";
@if(isNotEmpty(onSwitchChange)){
@   SwitchHandler=onSwitchChange;
@}
@var checked=false;
@if(value == 1){
@   checked=true;
@}
<div class="form-group has-feedback">
    <label for="${id}+swi" class="lab">${name}</label>
    <div class="ele  has-feedback">
        <input type="hidden" id="${id}" name="${id}" value=${value} />
        <div id="${id}+swi" class="hisui-switchbox" style="margin-left:5px" data-options="onText:'${onText}',offText:'${offText}',size:'${size}',animated:true,onClass:'primary',offClass:'gray',onSwitchChange:function(event,obj){var ov=$('#${id}').val();var nv=1^ov;$('#${id}').val(nv);${SwitchHandler}();},checked:${checked}">
        </div>
    </div>
</div>